i=0
NUM_DEV = 2
buf = chr(0xaa) * 2*NUM_DEV*24

f = open("/dev/ttyUSB0", "w")

def send_frame(f, buf):
  global NUM_DEV
  f.write('D')
  for x in range(2*NUM_DEV*24):
    f.write(buf[x])

#def update_buffer(buf):
#  global i, NUM_DEV
#  i = (i+1)%256
#  for x in range(2*NUM_DEV*24):
#    buf[x] = chr(i)  

while True:
#  update_buffer(buf)
  send_frame(f,buf)

f.close()


